package com.exploadingelephants.sprite;

import java.io.Serializable;

/**
 * Definition of a Movement. Used for any kind of sprite element.
 */
public class Movement implements Serializable {
	private static final long serialVersionUID = 692944793514771047L;

	/** Current x-Position */
    private float xPosition;
    /** Current y-Position */
    private float yPosition;
    /** Current x-Speed */
	private float xSpeed;
	/** Current y-Speed*/
    private float ySpeed;
    
    /**
     * @param xPos
     * @param yPos
     * @param xSpeed
     * @param ySpeed
     */
    public Movement(float xPos, float yPos, float xSpeed, float ySpeed) {
		this.xPosition = xPos;
		this.yPosition = yPos;
		this.xSpeed = xSpeed;
		this.ySpeed = ySpeed;
	}

    /**
     * @param xPos
     * @param yPos
     */
	public Movement(float xPos, float yPos) {
		this(xPos, yPos, 0, 0);
	}

    public synchronized float getxPosition() {
		return xPosition;
	}

	public synchronized void setxPosition(float xPosition) {
		this.xPosition = xPosition;
	}

	public synchronized float getyPosition() {
		return yPosition;
	}

	public synchronized void setyPosition(float yPosition) {
		this.yPosition = yPosition;
	}

	public synchronized float getxSpeed() {
		return xSpeed;
	}

	public synchronized void setxSpeed(float xSpeed) {
		this.xSpeed = xSpeed;
	}

	public synchronized float getySpeed() {
		return ySpeed;
	}

	public synchronized void setySpeed(float ySpeed) {
		this.ySpeed = ySpeed;
	}
}
